/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.ucb.ProjetoFinal.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author DCBorges
 */
@Embeddable
public class GrupoEmpreendimentoPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "CO_APF")
    private int coApf;
    @Basic(optional = false)
    @NotNull
    @Column(name = "NU_SNQCL_GRPO_FMLR")
    private int nuSnqclGrpoFmlr;

    public GrupoEmpreendimentoPK() {
    }

    public GrupoEmpreendimentoPK(int coApf, int nuSnqclGrpoFmlr) {
        this.coApf = coApf;
        this.nuSnqclGrpoFmlr = nuSnqclGrpoFmlr;
    }

    public int getCoApf() {
        return coApf;
    }

    public void setCoApf(int coApf) {
        this.coApf = coApf;
    }

    public int getNuSnqclGrpoFmlr() {
        return nuSnqclGrpoFmlr;
    }

    public void setNuSnqclGrpoFmlr(int nuSnqclGrpoFmlr) {
        this.nuSnqclGrpoFmlr = nuSnqclGrpoFmlr;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) coApf;
        hash += (int) nuSnqclGrpoFmlr;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof GrupoEmpreendimentoPK)) {
            return false;
        }
        GrupoEmpreendimentoPK other = (GrupoEmpreendimentoPK) object;
        if (this.coApf != other.coApf) {
            return false;
        }
        if (this.nuSnqclGrpoFmlr != other.nuSnqclGrpoFmlr) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.ucb.ProjetoFinal.domain.GrupoEmpreendimentoPK[ coApf=" + coApf + ", nuSnqclGrpoFmlr=" + nuSnqclGrpoFmlr + " ]";
    }
    
}
